package cn.itsource.controller;

import cn.itsource.basic.domain.BaseQuery;
import cn.itsource.domain.org.Employee;
import cn.itsource.domain.user.User;
import jdk.nashorn.internal.objects.annotations.Getter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
@RequestMapping("user")
public class UserController {


    @GetMapping("user/findOne/{id}")
    public User findOne(@PathVariable Long id){
        return new User(id,"zs");
    }

    @GetMapping("user/findAll")
    public List<User> findAll(){
        return Arrays.asList(new User(1L,"张三"),new User(2L,"李四"));
    }
}
